stream of consciousness
noun
°a literary device that seeks to describe this process by means of a long, unstructured soliloquy.